package br.pucrio.inf.aaaong.models.domain.form.fields;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import br.pucrio.inf.aaaong.models.domain.form.validation.NumerosEResponsaveisValidation;
import br.pucrio.inf.aaaong.models.form.FormField;
import br.pucrio.inf.aaaong.models.form.FormOption;
import br.pucrio.inf.aaaong.models.form.validation.FormValidation;
import br.pucrio.inf.aaaong.models.form.validation.defaults.NotNullFormValidation;

public enum PreInscricaoFields implements FormField {
		NUMERO_DE_INSCRICAO("Número de Inscrição", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		INDICACAO("Indicação"),

		NOME("Nome", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		LOGRADOURO("Logradouro", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		BAIRRO("Bairro", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		CIDADE("Cidade", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		ESTADO("Estado", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		PAIS("País", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		PONTO_REFERENCIA_END("Ponto de referência do endereço"),

		CEP("CEP", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		INSTITUICAO("Instituição de ensino", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),
		
		CURSO_SUPERIOR("Curso superior"),
		
		CURSO_TECNICO("Curso técnico"),
		
		DATA_NASCIMENTO("Data de nascimento", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),
		
		NUMERO_ENDERECO("Número do endereço", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),

		SERIE_TECNICO("Série do técnico"),
		
		DATA_DE_INSCRICAO("Data de inscrição", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		)),
		
		TURNO_ESCOLAR("Turno escolar", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		), Arrays.asList(
			new FormOption("Matutino"),
			new FormOption("Vespertino"),
			new FormOption("Noturno")
		)),
		
		NIVEL_ESCOLAR("Nível Escolar", Arrays.asList(
			(FormValidation) new NotNullFormValidation()
		), Arrays.asList(
			new FormOption("Ensino Fundamental", "Fundamental"),
			new FormOption("Ensino Médio", "Médio"),
			new FormOption("Ensino Superior", "Superior")
		)),
		
		SERIE_BASICO("Série Escolar"),
		
		PERIODO("Período"),
		
		TELEFONES_FIXOS("Telefone Fixo", Arrays.asList(
			(FormValidation) new NumerosEResponsaveisValidation()
		)),
		
		CELULARES("Celular", Arrays.asList(
			(FormValidation) new NumerosEResponsaveisValidation()
		));
		
		private String prettyName;
		private List<FormOption> options;
		private List<FormValidation> validations;
		
		PreInscricaoFields(String prettyName) {
			this(prettyName, null, null);
		}
		
		PreInscricaoFields(String prettyName, List<FormValidation> validations) {
			this(prettyName, validations, null);
		}

		PreInscricaoFields(String prettyName, List<FormValidation> validations, List<FormOption> options) {
			this.prettyName = prettyName;
			this.options = options;
			if (validations == null) {
				this.validations = new ArrayList<FormValidation>();
			} else {
				this.validations = validations;
			}
		}

		@Override
		public String getPrettyName() {
			return prettyName;
		}
		
		@Override
		public List<FormOption> getOptions() {
			return options;
		}

		@Override
		public List<FormValidation> getValidations() {
			return this.validations;
		}
}
